/*
 * Copyright (c) 2020. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 */

package cn.afterturn.easypoi.word.entity.bookmark;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;

/*@Data
@ToString(callSuper = true)
@EqualsAndHashCode()*/
@Entity
@Table(name = "cellEntityVO", schema = "jeecg-boot-sjk", catalog = "")
public class CellEntityVO {
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getCellMaxbookvalueCount() {
        return cellMaxbookvalueCount;
    }

    public void setCellMaxbookvalueCount(int cellMaxbookvalueCount) {
        this.cellMaxbookvalueCount = cellMaxbookvalueCount;
    }

    public String getCellText() {
        return cellText;
    }

    public void setCellText(String cellText) {
        this.cellText = cellText;
    }

    public int getCellHirzon() {
        return cellHirzon;
    }

    public void setCellHirzon(int cellHirzon) {
        this.cellHirzon = cellHirzon;
    }

    public int getCellVertical() {
        return cellVertical;
    }

    public void setCellVertical(int cellVertical) {
        this.cellVertical = cellVertical;
    }

    public Set<ParagraphEntityVO> getParagraphEntityVOS() {
        return paragraphEntityVOS;
    }

    public void setParagraphEntityVOS(Set<ParagraphEntityVO> paragraphEntityVOS) {
        this.paragraphEntityVOS = paragraphEntityVOS;
    }

    public RowEntityVO getRowEntityVO() {
        return rowEntityVO;
    }

    public void setRowEntityVO(RowEntityVO rowEntityVO) {
        this.rowEntityVO = rowEntityVO;
    }
    @ApiModelProperty(value = "解析文档时自动生成的id")
    @Id
    @Column(name = "id")

    private String id;
    @JsonIgnore
    @Transient
    private int cellMaxbookvalueCount;
    @ApiModelProperty(value = "单元格中的文本")
    private String cellText;
    @ApiModelProperty(value = "单元格的行号")
    private int cellHirzon;
    @ApiModelProperty(value = "单元格的列号")
    private int cellVertical;//同时作为排序字段
    @ApiModelProperty(value = "单元格下的段落集合")
    @JsonIgnoreProperties("cellEntityVO")
    @OneToMany(mappedBy = "cellEntityVO",cascade = CascadeType.ALL,fetch = FetchType.EAGER)
    private Set<ParagraphEntityVO> paragraphEntityVOS=new HashSet<>();

    @JsonIgnoreProperties("cellEntityVO")
    @ManyToOne(cascade = CascadeType.ALL,optional = false,fetch = FetchType.LAZY)
    @JoinColumn(name = "rfid"/*,foreignKey = @ForeignKey(name = "none",value = ConstraintMode.NO_CONSTRAINT)*/)
    private RowEntityVO rowEntityVO;
}
